package com.beiding.service.storage;

import com.beiding.pojo.room.Room;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 房源存储服务的代理
 */

@FeignClient(name = "room")
public interface RoomStorageService {

    @PostMapping("/room/feign/put")
    Room put(@RequestBody Room room);

    @PostMapping("/room/feign/update")
    Room update(@RequestBody Room room);

    @PostMapping("/room/feign/remove")
    void remove(@RequestParam("id") String id);

    //获取一个房源的详细信息
    @GetMapping("/room/feign/get")
    Room get(@RequestParam("id") String id);



}
